#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "app.h"
#include "func.h"

#define UNUSED(x)  ((void)x)

jmp_buf ctrl_c_jump;

int main(int argc, char*argv[])
{
    UNUSED(argc);
	UNUSED(argv);

    int ret = 0;
    struct app *p_app = NULL;

    p_app = (struct app *)malloc(sizeof(struct app));

    ret = setjmp(ctrl_c_jump);
    if (ret != 1) {
        ret = init(p_app);
        if (ret == TRUE)  
            run(p_app);
    }
   
    destroy(p_app);

    return 0;
}